import 'package:flutter/material.dart';

class LineButton extends StatelessWidget {
  LineButton(
      {required this.onPressed,
      required this.title,
      required this.content,
      this.isSelect = false});

  final void Function() onPressed;
  String title;
  Widget content;
  bool isSelect;

  @override
  Widget build(BuildContext context) {
    return GestureDetector(
      onTap: onPressed,
      child: Container(
        color: Colors.transparent,
        margin: EdgeInsets.symmetric(vertical: 6, horizontal: 5),
        child: Row(
          mainAxisAlignment: MainAxisAlignment.spaceBetween,
          children: [
            Text(
              title,
              style: TextStyle(color: Colors.black, fontSize: 16),
            ),
            Container(
              padding: EdgeInsets.symmetric(vertical: 4, horizontal: 6),
              decoration: BoxDecoration(
                  border: isSelect
                      ? Border.all(color: Color(0xff2b3db5), width: 1)
                      : null,
                  color: Colors.transparent,
                  borderRadius: BorderRadius.circular(10)),
              child: content,
            ),
          ],
        ),
      ),
    );
  }
}
